package com.bling.common.bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
 * 表单，不同表单通过配置组合
 * 
 * @author BLingSoft
 *
 */
@Entity
@Table(name="T_FORM")
public class Form implements Serializable {

	private static final long serialVersionUID = -2207467058262124931L;

	private Integer id; // 主键
	private String name; // 表单名称
	private String content; // 表单描述
	private Integer sort; // 表单排序
	
	private List<FormField> formfields = new ArrayList<FormField>();
	
	public Form() {
		super();
	}

	public Form(String name, String content, Integer sort) {
		super();
		this.name = name;
		this.content = content;
		this.sort = sort;
	}

	@Id
	@GeneratedValue
	@Column
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(length=50)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(length=100)
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column
	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	@Transient
	public List<FormField> getFormfields() {
		return formfields;
	}

	public void setFormfields(List<FormField> formfields) {
		this.formfields = formfields;
	}
}
